Skip to content

ReactiveList.AsMemory() method

Defined in

Type: ReactiveList Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

public ReadOnlyMemory<T> AsMemory()

View source (opens in a new tab)

Summary: Gets a read-only memory region over a snapshot of the items.

Returns: ReadOnlyMemory (opens in a new tab) -- A read-only memory region over the items as they were when this method ran.

Remarks

The region has the same contract as AsSpan: it is a point-in-time view that later mutations do not change, and it is shared with AsSpan and enumeration until the next mutation. It stays valid after the list is disposed. It must be treated as read-only.